// pages/food2/food2.js
Page({
  data: {
  },
  onLoad(options) {
    // this.getCanteen()
    console.log('店铺页类型：',options.canteentype);
    
    let canteenType = options.canteentype
    wx.cloud.callFunction({
      name:"getCanteen",
      data:{
        canteenType
      }
    }).then(res=>{
      console.log('店铺',res);
      this.setData({
        canteenList: res.result.data
      })
    })
  },
  goFood(e){
    let name = e.currentTarget.dataset.canteen.name
    console.log(e.currentTarget.dataset.canteen.name);
    wx.navigateTo({
      url: '/pages/food/food?name_lxj=' + name,
    })
  }
  // getCanteen(options){
  //   let canteenType=options.canteentype
  //   wx.cloud.callFunction({
  //     name:"getCanteen",
  //     data:{
  //       canteenType:canteenType
  //     }
  //   }).then(res=>{
  //     console.log('店铺',res);
  //     this.setData({
  //       canteenList: res.result.data
  //     })
  //   })
  // }
})